﻿package mortal.game.view.signUp.sevenDayLogin
{
    import Framework.Util.*;
    import Message.Game.*;
    import extend.language.*;
    import mortal.common.error.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.mvc.*;
    import mortal.mvc.core.*;

    public class SevenDayLoginProxy extends Proxy
    {

        public function SevenDayLoginProxy()
        {
            return;
        }// end function

        public function getSevenDayReward(param1:int) : void
        {
            rmi.iRolePrx.getSevenDaysLoginReward_async(new AMI_IRole_getSevenDaysLoginReward(this.onGetReward, this.onFail), param1);
            return;
        }// end function

        private function onGetReward(param1:AMI_IRole_getSevenDaysLoginReward, param2:int) : void
        {
            MsgManager.showRollTipsMsg("" + Language.getString(71935));
            Cache.instance.sevenDayLogin.setGetFlag(param2);
            Dispatcher.dispatchEvent(new DataEvent(EventName.SevenDayLoginUpdateReward, param2));
            return;
        }// end function

        private function onFail(param1:Exception) : void
        {
            MsgManager.showRollTipsMsg(ErrorCode.getErrorStringByCode(param1.code));
            return;
        }// end function

    }
}
